package com.qf.service.impl;

import com.qf.mapper.ShopMapper;
import com.qf.pojo.Shop;
import com.qf.service.ShopService;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

/**
 * 针对商品的业务接口实现
 */
@Service
public class ShopServiceImpl implements ShopService {

    //注入ShopMapper:持久层

    @Autowired//注入ShopMapper
    private ShopMapper shopMapper ;

    @Override
    public List<Shop> getAllShop() {


        List<Shop> list = shopMapper.findAll();
        if(list!=null){
            return list ;
        }

        return null;
    }
}
